﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace AutoSchedule.Dtos.MessageModel
{

    public class StockInFeedbackMsg
    {
        public EntryOrder entryOrder { get; set; }
        public List<OrderLinesItem> orderLines { get; set; }
        public List<DiffOrderLines> diffOrderLines { get; set; }
    }
    //{"entryOrder":{"entryOrderCode":"202004140001","ownerCode":"CBU8816093026319","warehouseCode":"800001573","clpsOrderCode":"CPL4418047933347","orderType":"CGRK","poOrderStatus":"70","operateTime":"2020-04-14 17:15:04","confirmType":0,"createUser":"romensfzl","outBizCode":"4976a6f3-3027-43ab-9d21-279d3ce20f63","ediRemark":""},"orderLines":[{"itemNo":"00000001","itemName":"耳聋左慈丸","itemId":"CMG4418287716460","planQty":2,"realInstoreQty":2,"diffQty":0,"shortQty":0,"damagedQty":0,"emptyQty":0,"expiredQty":0,"otherDiffQty":0,"remark":"","goodsStatus":"1","planFloatQty":2.0,"realInstoreFloatQty":2.0,"diffFloatQty":0.0,"shortFloatQty":0.0,"damagedFloatQty":0.0,"emptyFloatQty":0.0,"expiredFloatQty":0.0,"otherDiffFloatQty":0.0,"orderLineNo":"1"}]}
    //改了之后的
    /*
     {
  "entryOrder": {
    "entryOrderCode": "1407140535",
    "ownerCode": "CBU8816093029896",
    "warehouseCode": "800001828",
    "clpsOrderCode": "CPL4418048490893",
    "orderType": "CGRK",
    "poOrderStatus": "60",
    "operateTime": "2020-07-1510: 03: 30",
    "confirmType": 1,
    "createUser": "pdfwc111",
    "outBizCode": "37aecc04-b471-4e6b-a350-7c9690ef8a67",
    "ediRemark": "",
    "poWmsReturnMode": 2
  },
  "orderLines": [
    {
      "itemNo": "210036",
      "itemName": "硝苯地平缓释片(I)/得高宁/心痛定@10mg*50片0",
      "itemId": "CMG4418393813850",
      "planQty": 300,
      "realInstoreQty": 170,
      "diffQty": 0,
      "shortQty": 0,
      "damagedQty": 0,
      "emptyQty": 0,
      "expiredQty": 0,
      "otherDiffQty": 0,
      "diffRemark": "拒收",
      "batchs": [
        {
          "itemNo": "CMG4418393813850",
          "batchCode": "2206",
          "backQty": 100,
          "goodsLevel": "100",
          "backFloatQty": 100.0,
          "batAttrList": [
            {
              "batchKey": "customBacthCode",
              "batchValue": "2206"
            },
            {
              "batchKey": "madedate",
              "batchValue": "2020-06-01"
            },
            {
              "batchKey": "expiredate",
              "batchValue": "2022-06-01"
            }
          ]
        }]}]}
     */

    public class DiffOrderLines
    {
        /// <summary>
        /// 
        /// </summary>
        public string itemNo { get; set; }
        /// <summary>
        /// 硝苯地平缓释片(I)/得高宁/心痛定@10mg*50片0
        /// </summary>
        public string itemName { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string itemId { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string planQty { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string diffQty { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string shortQty { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string damagedQty { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string emptyQty { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string expiredQty { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string rejectQty { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string otherDiffQty { get; set; }
        /// <summary>
        /// 拒收
        /// </summary>
        public string diffRemark { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string orderLineNo { get; set; }
    }

    public class EntryOrder
    {
        /// <summary>
        /// 
        /// </summary>
        public string entryOrderCode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string ownerCode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string warehouseCode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string clpsOrderCode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string orderType { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string poOrderStatus { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string operateTime { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string confirmType { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string createUser { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string outBizCode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string ediRemark { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int poWmsReturnMode { get; set; }
    }

    public class BatAttrListItem
    {
        /// <summary>
        /// 
        /// </summary>
        public string batchKey { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string batchValue { get; set; }
    }

    public class BatchsItem
    {
        /// <summary>
        /// 
        /// </summary>
        public string itemNo { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string batchCode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string backQty { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string goodsLevel { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string backFloatQty { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public List<BatAttrListItem> batAttrList { get; set; }
    }

    public class OrderLinesItem
    {
        /// <summary>
        /// 
        /// </summary>
        public string itemNo { get; set; }
        /// <summary>
        /// 硝苯地平缓释片(I)/得高宁/心痛定@10mg*50片0
        /// </summary>
        public string itemName { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string itemId { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string planQty { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string realInstoreQty { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string diffQty { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string shortQty { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string damagedQty { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string emptyQty { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string expiredQty { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string otherDiffQty { get; set; }
        /// <summary>
        /// 拒收
        /// </summary>
        public string diffRemark { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public List<BatchsItem> batchs { get; set; }
    }
}
